/**
 * 作品上传接口
 */
import request from "../request.js";
import url from "../../url/url.js";

export default {
    /**
     * 传资料第一步-视频素材（保存上传文件信息）
     */
    saveVideoMaterial(data) {
        return request({
            url: url.baseUrl + "/video/videoMaterial",
            data: data,
            method: "put"
        });
    },
    /**
     * 上传资料第一步-模板压缩包（保存上传文件信息）
     */
    saveTemplateMaterial(data) {
        return request({
            url: url.baseUrl + "/video/templateMaterial",
            data: data,
            method: "put"
        });
    },
    /**
     * 获取视频列表 /video/page?pageSize=10&pageNum=1
     */
    getVideoList(page, data) {
        return request({
            url: url.baseUrl + "/video/page?pageSize=" + page.pageSize + "&pageNum=" + page.pageNum,
            data: data,
            method: "post"
        });
    },

    /**
     * 获取待提交视频列表 /video/getMyVideoList
     */
    getMyVideoList(data) {
        return request({
            url: url.baseUrl + "/video/getMyVideoList",
            data: {
                ...data,
                status: 4
            },
            method: "post"
        });
    },

    uploadFile(data) {
        return request({
            uploadFile: true,
            url: url.baseUrl + "/common/upload",
            data: data,
            method: "post"
        });
    },
}